'use strict';
module.exports = {
	/**
	 * @url client/pages/kh/getAgentApply 前端调用的url参数地址
	 * data 请求参数
	 * @param {String} params1  参数1
	 */
	main: async (event) => {
		const db = uniCloud.database();
		let { data = {}, userInfo, util, filterResponse, originalParam } = event;
		let { customUtil, uniID, config, pubFun, vk, _ } = util;
		let { uid } = data;
		let res = { code: 0, msg: "" };
		// 业务逻辑开始-----------------------------------------------------------

		let ApplyInfo = await db.collection('a_agent_apply').where({
			user_id: uid
		}).orderBy('_add_time','desc').get()
		res.applyInfo = ApplyInfo.data[0];



		// 业务逻辑结束-----------------------------------------------------------
		return res;
	}
}
